package com.wc.AlgoOJ_train.train1.c4.A405;

import java.util.Scanner;

/**
 * @Author congge
 * @Date 2024/1/9 10:04
 * @description
 * Switch Game 数因子的个数为奇数就是1，偶数就是0
 * http://43.138.190.70:8888/p/A405
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int n = sc.nextInt();
            int po = (int) Math.pow(n, 0.5);
            if (po * po == n) {
                System.out.println(1);
            } else {
                System.out.println(0);
            }
        }
    }
}
